package com.wufan.day07;

/**
 * @author SongWufan
 * @date 2021/4/4 22:47
 */
public class Kids extends ManKind{
    private int yearsOld;

    public Kids() {
        super();
    }
    public Kids(int yearsOld) {
        this.yearsOld = yearsOld;
    }

    public void printAge() {
        System.out.println("I am "+yearsOld+" years old");
    }

    public int getYearsOld() {
        return yearsOld;
    }

    public void setYearsOld(int yearsOld) {
        this.yearsOld = yearsOld;
    }

    /**
     * 重写
     */
    @Override
    public void employed() {
        System.out.println("Kids should study");
    }
}
